package com.alex.ioc;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application01 {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml");

        User user = ctx.getBean("user", User.class);
        user.setName("lucy");
        System.out.println(user);

        System.out.println(ctx.getBean("car"));
        System.out.println(ctx.getBean("car"));
    }
}
